import VueRouter from 'vue-router'

//将tarbar中的vue引入
import home from './components/tarbar/homecontainer.vue';
import member from './components/tarbar/membercontainer.vue';
import shopcar from './components/tarbar/shopcarcontainer.vue';
import search from './components/tarbar/searchcontainer.vue';
import newsList from './components/news/newsList.vue';
import newsInfo from './components/news/newsinfo.vue';
import photo from './components/photo/photo.vue';

// 3. 创建路由对象
var router = new VueRouter({
  routes: [
    { path:'/',redirect:'/home'},
    { path:'/home',component:home},
    { path:'/member',component:member},
    { path:'/shopcar',component:shopcar},
    { path:'/search',component:search},
    { path:'/home/newsList',component:newsList},
    { path:'/home/newsInfo/:id',component:newsInfo},
    { path:'/home/photo',component:photo}
  ],
  linkActiveClass: "mui-active"
})

// 把路由对象暴露出去
export default router